function plot_sort_pop_act(mean_sort_act)

ymax=max(max(mean_sort_act));

figure;
plot(mean_sort_act(:,2),'color',[0.5 0.5 0.5],'linewidth',1.5)
hold on
plot(mean_sort_act(:,17),'color',[0.3 0.7 0.3],'linewidth',1.5)
plot(mean_sort_act(:,3),'color',[1 0.5 0],'linewidth',1.5)
plot(mean_sort_act(:,46),'color',[0 0 1],'linewidth',1.5)
plot(mean_sort_act(:,47),'color',[0 0 0],'linewidth',1.5)
legend('feedback','playback','FFM','baseline.run','baseline.sit')
ylim([0 ymax])

% fb LFM
sequ=[1 2 3 8 9 10 4 5 6 11 12 13 7];
figure;
for ind=1:13
    subplot(2,7,sequ(ind))
    if ind<13
        plot(mean_sort_act(:,4+(ind-1)),'linewidth',1.5)
    else
        plot(mean_sort_act(:,3),'linewidth',1.5)
    end
    ylim([0 ymax])
end

% pb LFM
sequ=[1 2 3 8 9 10 4 5 6 11 12 13 7];
figure;
for ind=1:13
    subplot(2,7,sequ(ind))
    if ind<13
        plot(mean_sort_act(:,34+(ind-1)),'color',[0.3 0.7 0.3],'linewidth',1.5)
    else
        plot(mean_sort_act(:,33),'color',[0.3 0.7 0.3],'linewidth',1.5)
    end
    ylim([0 ymax])
end

% feedback and FFMdecoupl during playback
figure;
plot(mean_sort_act(:,18),'color',[0.5 0.5 0.5],'linewidth',1.5)
hold on
plot(mean_sort_act(:,19),'color',[1 0.5 0],'linewidth',1.5)
legend('feedback.pb','FFM.decoup')
ylim([0 ymax])


% FFM and LFM during playback
sequ=[1 2 3 8 9 10 4 5 6 11 12 13 7];
figure;
for ind=1:13
    subplot(2,7,sequ(ind))
    if ind<13
        plot(mean_sort_act(:,21+(ind-1)),'color',[0.3 0.7 0.3],'linewidth',1.5)
    else
        plot(mean_sort_act(:,20),'color',[0.3 0.7 0.3],'linewidth',1.5)
    end
    ylim([0 ymax])
end

%baselines
figure;
plot(mean_sort_act(:,1),'color',[0.5 0.5 0.5],'linewidth',1.5)
hold on
plot(mean_sort_act(:,16),'color',[0.3 0.7 0.3],'linewidth',1.5)
plot(mean_sort_act(:,46),'color',[0 0 1],'linewidth',1.5)
plot(mean_sort_act(:,47),'color',[0 0 0],'linewidth',1.5)
legend('feedback.bas','playback.bas','baseline.run','baseline.sit')
ylim([0 ymax])
